1. Field of the Invention
This invention relates to a writing method and device for a recordable or rewritable compact disk, and more particularly, to a link writing method and device that restarts writing after writing has been interrupted.
2. Discussion of the Related Art
Recordable or rewritable optical disk media typically include a continuous spiral groove which extends for the entire data storage capacity of the disk. CD-based optical disk media architectures utilize a continuous spiral groove with sectors (also called “blocks”) of equal length, which are accessed at a constant linear velocity (CLV).
A recordable compact disk (CD-Recordable or CD-R) or a rewritable compact disk (CD-Rewritable or CD-RW) is a CD-based optical disk medium, and includes a continuous spiral CLV groove. Input data are modulated and written into the continuous spiral CLV groove. In general, the coding modulation of stored CD-R data is an eight-to-fourteen modulation (EFM). The eight-to-fourteen modulation turns the input data signal, along with error correction data, address information, sync pattern (synchronization pattern) and other miscellaneous content into an encoded binary stream of bits, expanding every eight bits of data into fourteen bit words, with an additional three bits inserted into the bit stream to separate words.
FIG. 1 shows the data specification for each recording sector in a CD-based optical disk medium. As shown in FIG. 1, each recording second includes 75 recording blocks and each recording block includes 98 data frames. Moreover, each of the data frames consists of 588 channel bits including a sync pattern containing 24 channel bits, control and display data containing 14 channel bits, information data, correction parity data and other information. Since the CD-R data storage scheme does not provide identification marks along the groove to identify data recording positions precisely, each recording sector is formatted with a header having a great deal of information to aid in synchronizing the rotation of the disk and obtaining data framing. The sector header adds a great deal of overhead to the sector. Moreover, a limited number of entries may be placed in the table of contents (TOC) on the CD-R disk for locating the beginning of the recorded areas. Therefore, it is very important for a CD-R storage device not to interrupt the data writing process because of the overhead penalty.
Current CD-R storage devices use a buffer that accumulates the input data and organizes the data into sectors for writing on the disk in a continuous sequence of sectors. When the buffer of a current CD-R storage device does not receive input data from the host on a timely basis (due to higher priority tasks or interrupts using host resources), the buffer may under-run and may become empty, causing the writing process to be halted. This results in a data file being partially written. One proposed solution, which is undesirable, is to stop writing sectors upon the occurrence of the under-run. It is not possible to restart the writing process after stopping because the succeeding recording position cannot be located precisely. Most often, the user application cannot deal with the problem of linking between a prior recording process and a succeeding recording process, so the disk is considered ruined and is discarded.
In light of this problem, U.S. Pat. No. 6,119,201 discloses a method employing a formatted padding sector to resolve the under-run problem. The method disclosed by the patent writes one or several formatted padding sectors when a buffer encounters an under-run condition. While the method can resolve the under-run problem without stopping writing, it wastes disk space as it requires writing one or several complete formatted padding sectors. Moreover, the method wastes time in reading since it needs to judge if the read data are padding sectors or not. What is more, the method cannot overcome the problem of writing interruption caused by a servo problem.
Therefore, it is necessary to have a link writing method and device for a recordable compact disk to restart the writing process at the location where it is interrupted. This would effectively resolve the problems of writing interruption caused by buffer under-run or other problems.
FIG. 2 illustrates the situation in which the data frame of the succeeding (restarted) writing process overlaps the previous data frame according to a prior strategy. As the demand on the length of the data frame stored on the CD-based medium is rigorous, the length of the data frame is set to 588 T (bits) in order to correctly read the data written. But as shown in FIG. 2, if the (n+1)th data frame is written before the interruption and the (n+2)th data frame is written imprecisely after the interruption, the later written frame may overlap the previously written frame. The resulting overlap may cause a reading drive to be unable to differentiate between the two written data frames, and a data reading error occurs. As shown in FIG. 2, either range (A) is treated as two frames or range (B) is treated as one frame and either will cause a data reading error.
Moreover, FIG. 3 illustrates the situation that the data frame of the succeeding writing forms a gap with the previous data frame according to a prior strategy. As shown in FIG. 3, a linking gap may appear between a written nth frame and a succeeding written (n+1)th frame when the writing is interrupted between the nth and (n+1)th frames. In this situation a reading error also occurs. This is because the linking gap has redundant channel bits, which cause the reading drive to be unable to differentiate between the data frames when it is reading. For instance, as shown in FIG. 3, either range (A) is treated as two frames or range (B) is treated as one frame and either will cause a data acquisition error. Therefore, it is very important to position the writing interruption address accurately and to begin successive writing accurately.